/**
 * @param {number} n
 * @return {boolean}
 */
var isPowerOfThree = function(n) {
  if(n <= 0) return false;
  return (1162261467 % n) === 0 ? true : false;
};
let n = 27;
console.log(isPowerOfThree(n));
n = 0;
console.log(isPowerOfThree(n));
n = 9;
console.log(isPowerOfThree(n));
n = 45;
console.log(isPowerOfThree(n));
n = -3;
console.log(isPowerOfThree(n));
